package com.sl.feign.consumer.service;

import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import com.sl.feign.consumer.FullLogConfiguration;

 
//指定服务名来绑定服务(不区分大小写)
@FeignClient(name = "hello-service", fallback=HelloServiceFallback.class, configuration = FullLogConfiguration.class)
public interface HelloService {

	//请求服务的/hello接口
	@RequestMapping("/hello")
	String hello();
	
	
	//参数绑定，绑定在header里面的用注解@RequestHeader
	@RequestMapping("/hello1")
	String hello(@RequestParam("name")String name);
}
